package com.raza.user;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author RazaJin 用户服务启动类
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.raza.commons.mapper")
public class ListUserApplication {
    public static void main(String[] args) {
        SpringApplication.run(ListUserApplication.class, args);
    }
    @RestController
    public static class EchoController {
        @GetMapping(value = "/user/{id}")
        public String echo(@PathVariable String id) {
            return "当前用户为:" + id;
        }
    }
}
